#include <bits/stdc++.h>

using namespace std;

int main(int argc, char const *argv[])
{
	int n,k;scanf("%d%d",&n,&k);
	std::vector<int> cake(n);
	for (int i = 0; i < n; ++i)
	{
		scanf("%d",&cake[i]);
	}
	int ans=0;
	for (int i = 0; i < n; ++i)
	{
		int cnt=cake[i];
		while(cnt<k&&i<n){
			i++;
			cnt+=cake[i];
		}
		if(cnt>0)++ans;
	}
	printf("%d\n", ans);
	return 0;
}